package com.amokgames.tictactoe;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class MainActivity extends Activity {
	private EditText etServiceName;
	private Button bStartClient;
	private Button bStopClient;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        bStartClient.setOnClickListener(new OnClickListener() {
			public void onClick(View button) {
				Intent intent= new Intent(BTClient.START);
				intent.putExtra(BTClient.EXTRA_SERVICE_NAME, etServiceName.getText().toString());
				startService(intent);
			}
		});
        bStopClient.setOnClickListener(new OnClickListener() {
			public void onClick(View button) {
				Intent intent= new Intent(BTClient.STOP);
				stopService(intent);
			}
		});

    }
}